
av.query = function (name, url) {
    if (!name || typeof name != 'string') return '';
    if (!url) url = location.href;
    var mat = new RegExp('(^|[?&])(?:' + name + ')=(.*?)(&|#|$)', 'i').exec(url);
    if (mat && mat.length >= 2) return decodeURIComponent(mat[2]);
    return '';
};
av.top = function (y) {
    if (typeof y == 'undefined') {
        var top1 = document.body.scrollTop;
        var top2 = document.documentElement.scrollTop;
        return top1 || top2;
    }
    document.body.scrollTop = y;
    document.documentElement.scrollTop = y;
};

av.getWeek = function (datestr) {
    var wk = ['日', '一', '二', '三', '四', '五', '六'];
    var day = new Date(datestr).getDay();
    return wk[day];
};